The Exit statement allows you to exit from inside a block of code such as a conditional statement (Do ...Loop, For ... Next, For Each ... Next) or a procedure (Function, Sub) before it would normally be completed.
This allows you to exit from inside a Do Until ... Loop.
Code: <% Exit Do %>
This allows you to exit from inside a Do While ... Loop.
This allows you to exit from inside a For ... Next.
Code: <% Exit For %>
This allows you to exit from inside a For Each ... Next.
This allows you to exit from inside a Function.
Code: <% Exit Function %>
This allows you to exit from inside a Sub.
Code: <% Exit Sub %>